package com.diana.controller;

import com.diana.service.ManagerMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author anzhi
 * @since 2019-04-21
 */
@RestController
public class ManagerMenuController {

    @Autowired
    private ManagerMenuService managerMenuService;

    /**
     * 获取列表
     * @param map
     * @return
     */
    @RequestMapping("/admin/managerMenu/getMenuList")
    public String getMenuList(@RequestBody Map<String,Object> map){
        return managerMenuService.getMenuList(map);
    }

    /**
     * 新增
     * @param map
     * @return
     */
    @RequestMapping("/admin/managerMenu/addMenu")
    public String addMenu(@RequestBody Map<String,Object> map){
        return managerMenuService.addMenu(map);
    }

    /**
     * 修改
     * @param map
     * @return
     */
    @RequestMapping("/admin/managerMenu/updateMenu")
    public String updateMenu(@RequestBody Map<String,Object> map){
        return managerMenuService.updateMenu(map);
    }

    /**
     * 删除
     * @param map
     * @return
     */
    @RequestMapping("/admin/managerMenu/deleteMenu")
    public String deleteMenu(@RequestBody Map<String,Object> map){
        return managerMenuService.updateStatus(map);
    }

    /**
     * 获取Info
     * @param map
     * @return
     */
    @RequestMapping("/admin/managerMenu/getMenuInfo")
    public String getMenuInfo(@RequestBody Map<String,Object> map){
        return managerMenuService.getMenuInfo(map);
    }

}

